/**
 * 
 */
package it.uniroma3.engine.model.comparator;

import it.uniroma3.engine.model.CandidateProteinName;

import java.util.Comparator;

/**
 * @author Accosta Augusto
 * @author Lopez Elisabetta
 *
 */
public class CompareCandidatesByRank implements Comparator<CandidateProteinName> {

	@Override
	public int compare(CandidateProteinName o1, CandidateProteinName o2) {
		if(o1.getRank() < o2.getRank())
			return 1;

		if(o1.getRank() > o2.getRank())
			return -1;
		
		return 0;
	}

}
